module Model

using StaticArrays
using Dates

import Gtk; const G = Gtk

const XY = SVector{2,Float64}
function XY(motion_ev :: G.GdkEventMotion)
  XY(motion_ev.x :: Float64, motion_ev.y :: Float64)
end

const PriceType = Float64

struct Bucket
  open :: PriceType
  high :: PriceType
  low :: PriceType
  close :: PriceType
  end_time :: DateTime
  interval :: Period
end

const BitmexOneMinute = Dates.Minute(1)
const BitmexFiveMinutes = Dates.Minute(5)
const BitmexOneHour = Dates.Hour(1)
const BitmexOneDay = Dates.Day(1)

struct CandleStickChart
  interval :: Period
  symbol :: String
end

struct Trade
  price :: PriceType
  size :: Int64
  time :: DateTime
end

end
